package com.fanshuai.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * EventListener  处理事件, 默认为同步执行
 */
@Component
public class FanshuaiEventListener implements ApplicationListener<FanshuaiEvent> {
    @Override
    public void onApplicationEvent(FanshuaiEvent event) {
        System.out.println("receive event=" + event.getSource());
    }
}
